﻿using System;


namespace E2_WEBSITE.Code.Admin
{
    public class CompanyController
    {
        public CompanyInfo GetCompanyInfo()
        {
            try
            {
                CompanyDataAccess dc = new CompanyDataAccess();
                return dc.GetCompanyInfo();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public bool UpdateCompanyInfo(CompanyInfo info)
        {
            try
            {
                CompanyDataAccess dc = new CompanyDataAccess();
                return dc.UpdateCompanyInfo(info);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public bool UpdateCompanyInfo(string name, string email, string phone, string address, string banner)
        {
            try
            {
                CompanyDataAccess dc = new CompanyDataAccess();
                return dc.UpdateCompanyInfo(name, email, phone, address, banner);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}